package com.dog.basics.bean.dto.api.mtkj;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author hangdy
 * @description: TODO
 * @date 2020/11/12 17:01
 */
@Data
public class ApiGoodsSkuAddDto {
    /**
     * 规格名称
     */
    @NotNull(message = "规格名称不能为空")
    @ApiModelProperty(value = "规格名称不能为空", dataType = "String", required = true)
    @Size(min = 1,max = 30,message = "格式不正确")
    private String name;

    /**
     * 商品ID 和商品一起 新增 和 修改 没有值
     */
    @ApiModelProperty(value = "商品ID", dataType = "Long", required = false)
    private Long goodsId;

    /**
     * 商品规格价格
     */
    @NotNull(message = "商品规格价格不能为空")
    @ApiModelProperty(value = "商品规格价格", dataType = "BigDecimal", required = true)
    private BigDecimal price;

    /**
     * 商品规格库存
     */
    @NotNull(message = "商品规格库存不能为空")
    @ApiModelProperty(value = "商品规格库存", dataType = "Integer", required = true)
    private Integer stock;


}
